package com.baiduspring.dao.mapper;

import com.baiduspring.dao.entity.Article;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

//@Mapper
@Component
@Mapper
public interface ArticleMapper {
    int deleteByPrimaryKey(String id);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);

    Integer updateReadCount(Article article);

    //    @Select("select count(id) from tb_article")
    Long count();


    List<Article> selectArticlesAndPagging(Article article);

    Article selectArticleInfo(Article article);

    List<Article> selectArticlesByMid(Article article);

    Integer countArticlesByMid(Article article);

}
